package net.huashitong.node.entity;

import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;

import javax.persistence.Entity;
import javax.persistence.Table;

import com.sirdc.modules.core.entity.StringEntity;

/*
 * 项目节点进度实体类
 */
@Entity
@Table(name = "t_bnp_node_schedule")
public class NodeSchedules extends StringEntity{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String projectId;//项目ID
	
	private String nodeId;//节点编号

	private String nodeIds;//父id节点
	
	private String preNodeId;//前置节点编号
	
	private String nodeName;//节点名称
	
	private String resDept;//责任单位
	
	private String planTime;//计划用时
	
	private String factTime;//实际用时
	
	private String resUser;//责任人
	
	private String resUserPhone;//责任人联系方式
	
	private String operatorUser;//经办人
	
	private String operatorPhone;//经办人电话
	
	private String status;//状态
	
	private String type;//类型，节点/任务
	
	private String planBeginDate;//计划开始时间
	
	private String planFinishDate;//计划结束时间
	
	private String factBeginDate;//实际开始时间
	
	private String factFinishDate;//实际结束时间
	
	private int isCheck;//是否查看过（0未查看  1已查看）
	
	private String   resUserId;//责任人id
	private String operatorUserId;  //经办人id
	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}


	public String getNodeId() {
		return nodeId;
	}

	public void setNodeId(String nodeId) {
		this.nodeId = nodeId;
	}

	public String getPreNodeId() {
		return preNodeId;
	}

	public void setPreNodeId(String preNodeId) {
		this.preNodeId = preNodeId;
	}


	public String getNodeName() {
		return nodeName;
	}

	public void setNodeName(String nodeName) {
		this.nodeName = nodeName;
	}

	public String getResDept() {
		return resDept;
	}

	public void setResDept(String resDept) {
		this.resDept = resDept;
	}

	public String getPlanTime() {
		return planTime;
	}

	public void setPlanTime(String planTime) {
		this.planTime = planTime;
	}

	public String getFactTime() {
		return factTime;
	}

	public void setFactTime(String factTime) {
		this.factTime = factTime;
	}

	public String getResUser() {
		return resUser;
	}

	public void setResUser(String resUser) {
		this.resUser = resUser;
	}

	public String getResUserPhone() {
		return resUserPhone;
	}

	public void setResUserPhone(String resUserPhone) {
		this.resUserPhone = resUserPhone;
	}

	public String getOperatorUser() {
		return operatorUser;
	}

	public void setOperatorUser(String operatorUser) {
		this.operatorUser = operatorUser;
	}

	public String getOperatorPhone() {
		return operatorPhone;
	}

	public void setOperatorPhone(String operatorPhone) {
		this.operatorPhone = operatorPhone;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	public String getPlanBeginDate() {
		return planBeginDate;
	}

	public void setPlanBeginDate(String planBeginDate) {
		this.planBeginDate = planBeginDate;
	}

	public String getPlanFinishDate() {
		return planFinishDate;
	}

	public void setPlanFinishDate(String planFinishDate) {
		this.planFinishDate = planFinishDate;
	}

	public String getFactBeginDate() {
		return factBeginDate;
	}

	public void setFactBeginDate(String factBeginDate) {
		this.factBeginDate = factBeginDate;
	}

	public String getFactFinishDate() {
		return factFinishDate;
	}

	public void setFactFinishDate(String factFinishDate) {
		this.factFinishDate = factFinishDate;
	}

	public int getIsCheck() {
		return isCheck;
	}

	public void setIsCheck(int isCheck) {
		this.isCheck = isCheck;
	}
    
	public String getResUserId() {
		return resUserId;
	}

	public void setResUserId(String resUserId) {
		this.resUserId = resUserId;
	}

	public String getOperatorUserId() {
		return operatorUserId;
	}

	public void setOperatorUserId(String operatorUserId) {
		this.operatorUserId = operatorUserId;
	}

	public Map<String, Object> toMap(){
        Map<String,Object> map = new HashMap<String, Object>();
        Field[] fields = this.getClass().getDeclaredFields();
        for (Field field : fields) {
            Object obj;
            try {
                obj = field.get(this);
                if(obj!=null){
                    map.put(field.getName(), obj);
                }
            } catch (IllegalArgumentException e) {
                e.printStackTrace();
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            }
        }
        return map;
    }

	public String getNodeIds() {
		return nodeIds;
	}

	public void setNodeIds(String nodeIds) {
		this.nodeIds = nodeIds;
	}
}
